<template>
  <div>
    <!-- <p>犬只免疫详情</p> -->

    <div style="height: 600px">
      <el-steps direction="vertical" :active="number" align-center >
        <el-step title="已登记"  icon=" el-icon-success " ></el-step>
      
        <el-step v-show="status==2" title="免疫审核通过" icon=" el-icon-success "></el-step>
        <el-step status="error"  v-show="status==1"  title="免疫审核未通过" icon="el-icon-error"></el-step>
        <el-step v-show="immuneRegister!=null"  title="免疫登记" icon="el-icon-success"></el-step>
        <el-step title="" icon="el-icon-remove "></el-step>
      </el-steps>
    </div>
  </div>
</template>
<script>
import axios from "axios";
export default {
  data() {
    return {
      a:"aaaaaaaaaaa",
      status: "",
      immuneRegister: "",
      number:""
    };
  },
  methods: {
    init() {
      // console.log(sessionStorage.getItem("rid"));
      this.$axios
        .get(
          "http://localhost:9091/immune/immune/getdogbyoid?oid=" +
            sessionStorage.getItem("rid")
        )
        .then((resp) => {
            console.log(resp);
          if (resp.data.code == 200) {
            (this.status = resp.data.data.status),
              (this.immuneRegister = resp.data.data.immuneRegister);

               this.number=3
              if(this.status==2){
                console.log(this.immuneRegister!=null);
                if(this.immuneRegister!=null){
                  this.number=4
                }
               console.log(this.number);
              }
          } else {
            this.$message({
              type: "info",
              message: resp.data.message,
            });
          }
        });
    },
  },
  mounted() {
    this.init();
  // this.number=4
  //  this.status=2
  },
  computed: {},
};
</script>
<style scoped>
.color {
  color: red;
}
</style>
